class Animal(object):
    def eat(self):
        print('i can eat food')

    def sound(self):
        print('i can make a sound')

class Dog(Animal):
    def sound(self):
        print('i can wang wang wang')

class Cat(Animal):
    def sound(self):
        print('i can miao miao miao')

dog = Dog()
dog.eat()
dog.sound()

cat = Cat()
cat.eat()
cat.sound()